home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
DEM
/
D-H
/
Effects Specialist.sea
/
EffectsSpecialistDemo™.rsrc
/
FYps_30000_Background Generator
< prev
next >
Wrap
Text File
|
1991-06-19
|
6KB
|
142 lines
%! BACKGROUND GENERATOR 2.0
%% ©1986-1991, Postcraft International, Inc., All Rights Reserved
%% 91/02/24 Designed by Paul McLellan
%% For use only in files created by Effects Specialist.
/docomplex true def
Shade1 /B1v exch def /B1b exch def /B1g exch def /B1r exch def
Shade2 /B2v exch def /B2b exch def /B2g exch def /B2r exch def
gsave
newpath llx lly moveto llx ury lineto
urx ury lineto urx lly lineto closepath clip
/Xwidth urx llx sub 2 div def
/Ywidth ury lly sub 2 div def
/Radius Xwidth dup mul Ywidth dup mul add sqrt def
WashType 2 eq %% if wash is radial
{ /gRad Radius abs def }
{ WashAngle 0 eq WashAngle 180 eq or %% if wash is horizontal
{ /gRad Xwidth abs def
/gLen Ywidth abs def }
{ WashAngle 90 eq WashAngle 270 eq or %% if wash is vertical
{ /gRad Ywidth abs def
/gLen Xwidth abs def }
{ /Quad WashAngle 90 div truncate def
Quad 0 eq { /iAng 0 Ywidth Xwidth atan add def /jAng 180 Ywidth Xwidth atan sub def } if
Quad 1 eq { /iAng 180 Ywidth Xwidth atan sub def /jAng 180 Ywidth Xwidth atan add def } if
Quad 2 eq { /iAng 180 Ywidth Xwidth atan add def /jAng 360 Ywidth Xwidth atan sub def } if
Quad 3 eq { /iAng 360 Ywidth Xwidth atan sub def /jAng 0 Ywidth Xwidth atan add def } if
/gRad Radius iAng WashAngle sub cos mul abs 1.1 mul def
/gLen Radius jAng 90 add WashAngle sub cos mul abs 1.1 mul def } ifelse
} ifelse
} ifelse
/GrayDiameter gRad 2 mul def
TextAngle 0 eq TextAngle 180 eq or %% text —
{ /TextRadius Ywidth abs def }
{ TextAngle 90 eq TextAngle 270 eq or %% text |
{ /TextRadius Xwidth abs def }
{ /Quad TextAngle 90 div truncate def
Quad 0 eq { /iAng 180 Ywidth Xwidth atan sub def } if
Quad 1 eq { /iAng 180 Ywidth Xwidth atan add def } if
Quad 2 eq { /iAng 360 Ywidth Xwidth atan sub def } if
Quad 3 eq { /iAng 0 Ywidth Xwidth atan add def } if
/TextRadius Radius iAng 90 add TextAngle sub cos mul abs 1.1 mul def } ifelse
} ifelse
TextAngle 0 eq TextAngle 180 eq or %% if text is horizontal
{ /TextWidth Xwidth abs def }
{ TextAngle 90 eq TextAngle 270 eq or %% if text is vertical
{ /TextWidth Ywidth abs def }
{ /Quad TextAngle 90 div truncate def
Quad 0 eq { /iAng 0 Ywidth Xwidth atan add def } if
Quad 1 eq { /iAng 180 Ywidth Xwidth atan sub def } if
Quad 2 eq { /iAng 180 Ywidth Xwidth atan add def } if
Quad 3 eq { /iAng 360 Ywidth Xwidth atan sub def } if
/TextWidth Radius iAng TextAngle sub cos mul abs 1.1 mul def } ifelse
} ifelse
Xwidth llx add Ywidth lly add translate
B1v B2v eq B1b B2b eq B1g B2g eq B1r B2r eq and and and
{ /docomplex false def
WashType 3 eq %% Text
{ /cx llx Xwidth add def %% centre of page
/cy lly Ywidth add def
/eol? {currentpoint pop TextWidth gt} def
/mywhy 0 def
TextAngle rotate
0 TextRadius neg translate
Font findfont [Size 0 0 Size 0 0 ] makefont setfont
B1r B1g B1b B1v SMG
{ TextRadius neg Size TextRadius
{ TextWidth neg 0 moveto
{ currentpoint pop /cpx exch def
String show eol? {exit} if } loop
/mywhy mywhy Size 1.1 mul add def
0 Size 1.1 mul translate } for } if } if
WashType 2 eq WashType 1 eq WashType 0 eq or or
{ B1r B1g B1b B1v SMG
Xwidth llx add neg Ywidth lly add neg translate
{ newpath llx lly moveto llx ury lineto
urx ury lineto urx lly lineto closepath fill
} if } if
} if
WashType 3 eq docomplex and %% Text
{ /cx llx Xwidth add def %% centre of page
/cy lly Ywidth add def
/gx cx WashAngle TextAngle sub cos gRad mul sub def
/gy cy WashAngle TextAngle sub sin gRad mul sub def
/backM WashAngle TextAngle sub
90 add
dup sin exch cos div def
/backB gy backM gx mul sub def
/distDeno 1 backM dup mul add sqrt def
/eol? {currentpoint pop TextWidth gt} def
/pointred { %% x pointred rvalue
TextWidth add backM mul mywhy sub backB add abs distDeno div
gRad 2 mul div B2r B1r sub mul B1r add } def
/pointgreen { %% x pointgreen gvalue
TextWidth add backM mul mywhy sub backB add abs distDeno div
gRad 2 mul div B2g B1g sub mul B1g add } def
/pointblue { %% x pointblue bvalue
TextWidth add backM mul mywhy sub backB add abs distDeno div
gRad 2 mul div B2b B1b sub mul B1b add } def
/pointgray { %% x pointgray grey
TextWidth add backM mul mywhy sub backB add abs distDeno div
gRad 2 mul div B2v B1v sub mul B1v add } def
/mywhy 0 def
TextAngle rotate
/GrayStep Size def
0 TextRadius neg translate
Font findfont [Size 0 0 Size 0 0 ] makefont setfont
TextRadius neg Size TextRadius {
TextWidth neg 0 moveto
{ currentpoint pop /cpx exch def
cpx pointred cpx pointgreen cpx pointblue cpx pointgray SMG pop
String show eol? {exit} if } loop
/mywhy mywhy Size 1.1 mul add def
0 Size 1.1 mul translate } for } if
WashType 2 eq docomplex and %% Radius
{ 1.25 setlinewidth 5 setflat
0 1 gRad
{ /idx exch def newpath
Shade1 Shade2 gRad idx WGV SMG pop
/Rade idx .001 add def
0 0 Rade -15 375 arc stroke } for } if
WashType 1 eq docomplex and %% Log
{ {dup mul} settransfer
WashAngle 90 sub rotate
0 gRad neg translate
1.1 setlinewidth
0 1 GrayDiameter
{ /idx exch def newpath
Shade1 Shade2 GrayDiameter idx WGV SMG pop
gLen neg 0 moveto gLen 0 lineto stroke
newpath 0 1 translate } for } if
WashType 0 eq docomplex and %% Linear
{ WashAngle 90 sub rotate
0 gRad neg translate
1.1 setlinewidth
0 1 GrayDiameter
{ /idx exch def newpath
Shade1 Shade2 GrayDiameter idx WGV SMG pop
gLen neg 0 moveto gLen 0 lineto stroke
newpath 0 1 translate } for } if
grestore
%%